home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
pc
/
files
/
dsp
/
fteyaltr.z
/
fteyaltr
/
fftsubs.h86
< prev
next >
Wrap
Text File
|
1991-08-31
|
4KB
|
196 lines
extern short near x[], near qf[];
#define init\
_asm push si\
_asm push di\
_asm push bp
#define term\
_asm pop bp\
_asm pop di\
_asm pop si
#define _fft1(i) \
_asm sar x+2*i,1
#define _fft2(i0,i1) \
_asm mov ax,x+2*i0 \
_asm sar ax,1 \
_asm mov bx,x+2*i1 \
_asm sar bx,1 \
_asm mov cx,ax \
_asm add cx,bx \
_asm mov x+2*i0,cx \
_asm sub ax,bx \
_asm mov x+2*i1,ax
#define _fft3(i1,i3,i4) \
_asm mov ax,x+2*i4\
_asm sar ax,1\
_asm mov bx,x+2*i3\
_asm sar bx,1\
_asm mov cx,ax\
_asm sub cx,bx\
_asm sar cx,1\
_asm mov x+2*i4,cx\
_asm add ax,bx\
_asm sar ax,1\
_asm mov bx,x+2*i1\
_asm sar bx,1\
_asm mov cx,bx\
_asm sub cx,ax\
_asm mov x+2*i3,cx\
_asm add ax,bx\
_asm mov x+2*i1,ax
#define _fft4(i1,i2,i3,i4,cc1) \
_asm mov ax,x+2*i3\
_asm mov cx,cc1\
_asm imul cx\
_asm mov di,dx\
_asm mov si,dx\
_asm mov ax,x+2*i4\
_asm imul cx\
_asm add di,dx\
_asm sub si,dx\
_asm mov ax,x+2*i2\
_asm sar ax,1\
_asm mov bx,ax\
_asm sub bx,di\
_asm mov x+2*i4,bx\
_asm neg ax\
_asm sub ax,di\
_asm mov x+2*i3,ax\
_asm mov ax,x+2*i1\
_asm sar ax,1\
_asm sar ax,1\
_asm mov bx,ax\
_asm sub bx,si\
_asm mov x+2*i2,bx\
_asm add ax,si\
_asm mov x+2*i1,ax
#define _fft5a0(i3,i7,sm1,sp1,cc1,ind) \
_asm mov bp,x+2*i7\
_asm mov ax,sm1\
_asm imul bp\
_asm mov bx,dx\
_asm mov ax,x+2*i3\
_asm add bp,ax\
_asm mov dx,sp1\
_asm imul dx\
_asm mov cx,dx\
_asm mov ax,cc1\
_asm imul bp\
_asm add bx,dx\
_asm add cx,dx
#define _fft5a1(i3,i7,sm1,sp1,cc1,ind) \
_asm mov bp,x+2*i7\
_asm mov ax,sm1\
_asm imul bp\
_asm mov bx,dx\
_asm mov ax,x+2*i3\
_asm sar ax,ind\
_asm add bp,ax\
_asm mov dx,sp1\
_asm imul dx\
_asm mov cx,dx\
_asm mov ax,cc1\
_asm imul bp\
_asm add bx,dx\
_asm add cx,dx
#define _fft5b0(i4,i8,sm3,sp3,cc3,ind) \
_asm mov bp,x+2*i8\
_asm mov ax,sm3\
_asm imul bp\
_asm mov si,dx\
_asm mov ax,x+2*i4\
_asm add bp,ax\
_asm mov dx,sp3\
_asm imul dx\
_asm mov di,dx\
_asm mov ax,cc3\
_asm imul bp\
_asm add si,dx\
_asm add di,dx\
#define _fft5b1(i4,i8,sm3,sp3,cc3,ind) \
_asm mov bp,x+2*i8\
_asm mov ax,sm3\
_asm imul bp\
_asm mov si,dx\
_asm mov ax,x+2*i4\
_asm sar ax,ind\
_asm add bp,ax\
_asm mov dx,sp3\
_asm imul dx\
_asm mov di,dx\
_asm mov ax,cc3\
_asm imul bp\
_asm add si,dx\
_asm add di,dx\
#define _fft5c(i1,i2,i3,i4,i5,i6,i7,i8) \
_asm mov ax,si\
_asm sub ax,bx\
_asm mov dx,x+2*i2\
_asm sar dx,1\
_asm mov bp,ax\
_asm sub bp,dx\
_asm mov x+2*i7,bp\
_asm add ax,dx\
_asm mov x+2*i4,ax\
_asm mov ax,cx\
_asm add ax,di\
_asm mov dx,x+2*i6\
_asm sar dx,1\
_asm mov bp,ax\
_asm sub bp,dx\
_asm mov x+2*i3,bp\
_asm add ax,dx\
_asm mov x+2*i8,ax\
_asm add bx,si\
_asm mov dx,x+2*i1\
_asm sar dx,1\
_asm mov bp,dx\
_asm sub bp,bx\
_asm mov x+2*i6,bp\
_asm add bx,dx\
_asm mov x+2*i1,bx\
_asm sub cx,di\
_asm mov dx,x+2*i5\
_asm sar dx,1\
_asm mov bp,dx\
_asm sub bp,cx\
_asm mov x+2*i5,bp\
_asm add cx,dx\
_asm mov x+2*i2,cx
#define _fft50(i1,i2,i3,i4,i5,i6,i7,i8,sm1,sp1,cc1,sm3,sp3,cc3,ind) \
_fft5a0(i3,i7,sm1,sp1,cc1,ind) \
_fft5b0(i4,i8,sm3,sp3,cc3,ind) \
_fft5c(i1,i2,i3,i4,i5,i6,i7,i8)
#define _fft51(i1,i2,i3,i4,i5,i6,i7,i8,sm1,sp1,cc1,sm3,sp3,cc3,ind) \
_fft5a1(i3,i7,sm1,sp1,cc1,ind) \
_fft5b1(i4,i8,sm3,sp3,cc3,ind) \
_fft5c(i1,i2,i3,i4,i5,i6,i7,i8)
#define _fft7(i1,i2) \
_asm mov ax,x+2*i2\
_asm imul ax\
_asm mov qf+2*i1,dx\
#define _fft8(i1,i2,i3) \
_asm mov ax,x+2*i2\
_asm imul ax\
_asm mov bx,ax\
_asm mov cx,dx\
_asm mov ax,x+2*i3\
_asm imul ax\
_asm add ax,bx\
_asm adc dx,cx\
_asm mov qf+2*i1,dx